using System;
using System.Diagnostics;
using Microsoft.Exchange.WebServices.Data;

namespace CalendarSubscriptionApp
{
	internal class ExchangeTraceRedirectListener : ITraceListener
	{
		private readonly TraceSource _Source;

		public ExchangeTraceRedirectListener(TraceSource source)
		{
			if (source == null) throw new ArgumentNullException("source");
			_Source = source;
		}

		public void Trace(string traceType, string traceMessage)
		{
			_Source.TraceEvent(TraceEventType.Information,0,  traceMessage);
		}
	}
}